package com.qf.service.impl;

import com.qf.dao.CartDao;

import com.qf.pojo.Cart;

import com.qf.service.CartService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class CartServiceImpl implements CartService{
    @Autowired
    private CartDao cartDao;
    @Override
    public List<Cart> selectall(int u_id) {
        List<Cart> select = cartDao.selectall(u_id);
        return select;
    }

    @Override
    public int delete(int id) {
        return cartDao.delete(id);
    }

    @Override
    public int update(Cart cart) {
        return cartDao.update(cart);
    }

    @Override
    public Cart selectone(int id) {
        return cartDao.selectone(id);
    }

    @Override
    public int add(Cart a) {
        return cartDao.add(a);
    }

}
